package com.example.schooldaka.task;

import cn.hutool.log.Log;
import com.example.schooldaka.service.ApiService;
import com.example.schooldaka.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @program: SchoolDaKa
 * @description: 打卡定时任务
 * @author: Mr.Gui
 * @create: 2022-01-11 13:49
 **/
@Slf4j
@Component
public class DaKaTask {

    @Autowired
    private ApiService apiService;

    @Scheduled(cron="0 01 8 * * ?")
    public void Task(){
        log.info("开始执行任务");
        Result data = apiService.login("2004220223", "qwelll999@", "广东省汕头市潮南区");
        log.info("执行结果{}",data);
    }



}
